<!DOCTYPE html>
<html lang="en">
<head>

    <meta charset="utf-8">
    <title>面向研究团队的参考文献管理与服务分布式系统</title>
    <meta name="keywords" content="面向研究团队的参考文献管理与服务分布式系统"/>
    <meta name="description" content="面向研究团队的参考文献管理与服务分布式系统"/>
    <meta name="viewport" content="width=device-width, initial-scale=1.0"/>
    <link href="/ma/css/bootstrap.min.css" rel="stylesheet" />
    <link href="/ma/css/bootstrap-table.css" rel="stylesheet" />
    <link href="/ma/css/bootstrap-editable.css" rel="stylesheet" />
    <link rel="stylesheet" href="/ma/css/font-awesome.min.css" />

    <link rel="stylesheet" href="/ma/css/ace.min.css" />
    <link rel="stylesheet" href="/ma/css/ace-rtl.min.css" />
    <link rel="stylesheet" href="/ma/css/ace-skins.min.css" />
    <link href="../css/jquery-confirm.min.css" rel="stylesheet"/>

    <script src="../js/ace-extra.min.js"></script>
    <script src="/ma/js/angular.min.js"></script>
    <script src="/ma/js/angular-cookies.min.js"></script>

    <script src="../js/jquery-1.7.1.js"></script>
    <script src="../js/jquery-ui-1.10.3.custom.min.js"></script>
    <script src="../js/jquery-ui-1.10.3.full.min.js"></script>
    <script src="../js/jquery-2.0.3.min.js"></script>
    <script src="../js/jquery-1.10.2.min.js"></script>
    <script src="../js/bootstrap.min.js"></script>

    <script src="/ma/js/bootstrap-table.js"></script>
    <script src="/ma/js/bootstrap-editable.js"></script>
    <script src="/ma/js/bootstrap-table-zh-CN.js"></script>
    <script src="/ma/js/typeahead-bs2.min.js"></script>
    <script src="/ma/js/ace-elements.min.js"></script>
    <script src="/ma/js/ace.min.js"></script>
    <script src="/ma/journaljs/journal.js"></script>
    <script src="/ma/mainjs/auth.js"></script>
    <script src="../js/jquery-confirm.min.js"></script>
    <script src="../js/chinese2pinyin.js"></script>
</head>
<body>
<div class="navbar navbar-default" id="navbar">
    <script type="text/javascript">
        try {
            ace.settings.check('navbar', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="navbar-container" id="navbar-container">
        <div class="navbar-header pull-left">
            <a href="#" class="navbar-brand"> <small> <i
                    class="icon-book"></i> 面向研究团队的参考文献管理与服务分布式系统
            </small>
            </a>
            <!-- /.brand -->
        </div><!-- /.navbar-header -->
        <div class="navbar-header pull-right" role="navigation">
            <ul class="nav ace-nav">

                <li class="light-blue"><a data-toggle="dropdown" href="#"
                                          class="dropdown-toggle"> <img class="nav-user-photo"
                                                                        src="/ma/avatars/user.jpg" alt="Jason's Photo" /> <span
                        class="user-info"> <small>欢迎,</small> 登录
						</span> <i class="icon-caret-down"></i>
                </a>
                    <ul
                            class="user-menu pull-right dropdown-menu dropdown-yellow dropdown-caret dropdown-close">
                        <li><a href="#"> <i class="icon-cog"></i> 设置
                        </a></li>
                        <li><a href="#"> <i class="icon-user"></i> 简况
                        </a></li>
                        <li class="divider"></li>
                        <li><a href="/ma/user/logout"  class="a_post"> <i class="icon-off"></i> 登出
                        </a></li>
                    </ul></li>
            </ul>
            <!-- /.ace-nav -->
        </div>
        <!-- /.navbar-header -->
    </div>
    <!-- /.container -->
</div>
<div class="main-container" id="main-container">
    <script type="text/javascript">
        try {
            ace.settings.check('main-container', 'fixed')
        } catch (e) {
        }
    </script>
    <div class="main-container-inner">
        <a class="menu-toggler" id="menu-toggler" href="#"> <span
                class="menu-text"></span>
        </a>
        <div class="sidebar" id="sidebar">
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'fixed')
                } catch (e) {
                }
            </script>
            <!-- #sidebar-shortcuts -->
            <ul class="nav nav-list">
                <li><a href="#" class="dropdown-toggle">
                    <i class="icon-book"></i> <span class="menu-text"> 所有参考文献
						</span> <b class="arrow icon-angle-down"></b>
                </a>
                    <ul class="submenu">
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 图书 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li><a href="/ma/miuser/Chinesebooks.html"> <i
                                        class="icon-leaf"></i> 中文图书
                                </a></li>
                                <li><a href="/ma/miuser/Chinesebooks1.html"> <i
                                        class="icon-leaf"></i> 西文图书
                                </a></li>
                            </ul></li>
                        <li><a href="#" class="dropdown-toggle">
                            <i class="icon-double-angle-right"></i> 期刊 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li class="active"><a href="/ma/miuser/Chinesejournals.html"> <i class="icon-leaf"></i>
                                    中文期刊
                                </a></li>
                                <li><a href="/ma/miuser/Englishjournals.html"> <i
                                        class="icon-leaf"></i> 西文期刊
                                </a></li>
                            </ul></li>
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 学位论文 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li><a href="#"> <i class="icon-leaf"></i> 中文学位论文
                                </a></li>
                                <li><a href="#"> <i class="icon-leaf"></i> 西文学位论文
                                </a></li>
                            </ul></li>
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 技术报告 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li><a href="#"> <i class="icon-leaf"></i> 中文技术报告
                                </a></li>

                                <li><a href="#" class="dropdown-toggle"> <i
                                        class="icon-leaf"></i> 西文技术报告
                                </a></li>
                            </ul></li>
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 专利 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li><a href="#"> <i class="icon-leaf"></i> 中文专利
                                </a></li>
                                <li><a href="#"> <i class="icon-leaf"></i> 西文专利
                                </a></li>
                            </ul></li>
                    </ul></li>
                <li class="active open"><a href="#" class="dropdown-toggle"> <i
                        class="icon-book"></i> <span class="menu-text"> 期刊论文集 </span> <b
                        class="arrow icon-angle-down"></b>
                </a>
                    <ul class="submenu">
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 期刊 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li class="active"><a href="/ma/miuser/journalAdd.html"> <i
                                        class="icon-leaf"></i> 中文期刊
                                </a></li>
                                <li><a href="/ma/miuser/journalAdd1.html"> <i class="icon-leaf"></i>
                                    西文期刊
                                </a></li>
                            </ul></li>
                        <li><a href="#" class="dropdown-toggle"> <i
                                class="icon-double-angle-right"></i> 论文集 <b
                                class="arrow icon-angle-down"></b>
                        </a>
                            <ul class="submenu">
                                <li><a href="#"> <i class="icon-leaf"></i> 中文论文集
                                </a></li>
                                <li><a href="#"> <i class="icon-leaf"></i> 西文论文集
                                </a></li>
                            </ul></li>
                    </ul></li>
                <li><a href="/ma/miuser/referenceGroup.html"> <i
                        class="icon-dashboard"></i> <span class="menu-text">
								参考文献分组 </span>
                </a></li>
                <li><a href="/ma/miuser/email2.html"> <i
                        class="glyphicon glyphicon-envelope"></i> <span class="menu-text">
								Email系统 </span>
                </a></li>
                <li><a href="/ma/miuser/message2.html"> <i
                        class="glyphicon glyphicon-comment"></i> <span class="menu-text">
								短信系统 </span>
                </a></li>
                <li><a href="/ma/miuser/indeAdmin.html"> <i
                        class="glyphicon glyphicon-user"></i> <span class="menu-text">
								个人信息 </span>
                </a></li>
                <li><a href="/ma/user/logout" class="a_post"> <i
                        class="glyphicon glyphicon-off"></i> <span class="menu-text">
								退出系统 </span>
                </a></li>
            </ul><!-- /.nav-list -->
            <div class="sidebar-collapse" id="sidebar-collapse">
                <i class="icon-double-angle-left"
                   data-icon1="icon-double-angle-left"
                   data-icon2="icon-double-angle-right"></i>
            </div>
            <script type="text/javascript">
                try {
                    ace.settings.check('sidebar', 'collapsed')
                } catch (e) {
                }
            </script>
        </div>
        <div class="main-content">
            <div class="breadcrumbs" id="breadcrumbs">
                <script type="text/javascript">
                    try {
                        ace.settings.check('breadcrumbs', 'fixed')
                    } catch (e) {
                    }
                </script>
                <ul class="breadcrumb">
                    <li><i class="icon-home home-icon"></i> <a href="#">主页</a></li>
                    <li><a href="#">期刊论文集</a></li>
                    <li><a href="#">期刊</a></li>
                    <li><a href="#">中文期刊</a></li>
                    <li class="active">期刊添加</li>
                </ul>
            </div>

            <div class="page-content">
                <div class="row">
                    <div class="col-xs-12">
                        <!-- PAGE CONTENT BEGINS -->
                        <div class="row">
                            <div class="col-xs-12">
                                <div class="table-responsive">
                                    <div id="toolbar" class="btn-group row">
                                        <div class="col-md-8" >
                                            <div class="table-header" style="background-color:#ffb44b;color:black">
                                               中文期刊
                                            </div>
                                        </div>
                                        <div class="col-md-4">
                                            <button id="AddBtn" onClick="add()" type="button" class="btn btn-default">
                                                <span class="glyphicon glyphicon-plus" aria-hidden="true"></span>新增
                                            </button>
                                        </div>
                                    </div>

                                    <table style="text-overflow: ellipsis;white-space: nowrap;" id="sample-table-2"></table>
                                </div>
                            </div>
                        </div>

                        <!-- PAGE CONTENT ENDS -->
                    </div>
                    <!-- /.col -->
                </div>
                <!-- /.row -->
            </div>

        </div>
        <div class="ace-settings-container" id="ace-settings-container">
            <div class="btn btn-app btn-xs btn-warning ace-settings-btn"
                 id="ace-settings-btn">
                <i class="icon-cog bigger-150"></i>
            </div>
            <div class="ace-settings-box" id="ace-settings-box">
                <div>
                    <div class="pull-left">
                        <select id="skin-colorpicker" class="hide">
                            <option data-skin="default" value="#438EB9">#438EB9</option>
                            <option data-skin="skin-1" value="#222A2D">#222A2D</option>
                            <option data-skin="skin-2" value="#C6487E">#C6487E</option>
                            <option data-skin="skin-3" value="#D0D0D0">#D0D0D0</option>
                        </select>
                    </div>
                    <span>&nbsp; 换肤</span>
                </div>
                <div>
                    <input type="checkbox" class="ace ace-checkbox-2"
                           id="ace-settings-add-container" /> <label class="lbl"
                                                                     for="ace-settings-add-container"> 居中 <b></b>
                </label>
                </div>
            </div>
        </div>
        <!-- /#ace-settings-container -->
    </div>
    <!-- /.main-container-inner -->
    <a href="#" id="btn-scroll-up"
       class="btn-scroll-up btn btn-sm btn-inverse"> <i
            class="icon-double-angle-up icon-only bigger-110"></i>
    </a>
</div>


<div class="modal fade" id="edit" tabindex="-1" role="dialog" aria-labelledby="myModalLabel">
    <div class="modal-dialog" role="document">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title" id="editModalLabel">编辑</h4>
            </div>
            <div class="modal-body">

                <form>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>期刊中文名</label>
                            <input type="text" class="form-control" style="width:40%" id="journalName2_edit">
                        </div>
                    </div>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>期刊英文名</label>
                            <input type="text" class="form-control" style="width:70%" id="journalName1_edit">
                        </div>
                    </div>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>ISSN</label>
                            <input type="text" class="form-control" style="width:70%" id="iSSN_edit">
                        </div>
                    </div>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>国内刊号</label>
                            <input type="text" class="form-control" style="width:40%" id="CN_edit">
                        </div>
                    </div>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>创办年份</label>
                            <input type="text" class="form-control" style="width:40%" id="foundYear_edit" disabled>
                        </div>
                    </div>

                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label></label>
                            <select name="releaseCycles_edit" id="releaseCycles_edit" style="height: 25px; ">
                                <option value="不定期">不定期</option>
                                <option value="季刊">季刊</option>
                                <option value="月刊">月刊</option>
                                <option value="双月刊">双月刊</option>
                                <option value="半月刊">半月刊</option>
                            </select>
                        </div>
                    </div>

                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>期刊email </label>
                            <input type="text" class="form-control" style="width:40%" id="journalEmail_edit">
                        </div>
                    </div>
                    <div class="row form-inline form-group">
                        <div class="col-md-2"></div>
                        <div class="col-md-6">
                            <label>备注</label>
                            <input type="text" class="form-control" style="width:70%" id="note_edit">
                        </div>
                    </div>
                </form>
            </div>

            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal"><span class="glyphicon glyphicon-remove" aria-hidden="true"></span>关闭</button>
                <button type="button" id="btn_submit_edit" class="btn btn-primary" data-dismiss="modal"><span class="glyphicon glyphicon-floppy-disk" aria-hidden="true"></span>保存</button>
            </div>
        </div>
    </div>
</div>



<script>
    $('#sample-table-2').bootstrapTable({
        ajax:function(request){
            $.ajax({
                type:"POST",
                url:'/ma/journal/journal-cn-list',
                contentType:'application/json;charset=utf-8',
                dataType:'json',
                data:JSON.stringify({
                    "pageNo": 1,
                    "pageSize":10
                }),
                success:function (response) {
                    request.success({
                        row:response.list,
                    });
                    $('#sample-table-2').bootstrapTable('load', response.list);
                },
                error:function(error){
                    console.log(error);
                }
            })
        },
        queryParams : function (params) {
            //这里的键的名字和控制器的变量名必须一致，这边改动，控制器也需要改成一样的
            var temp = {
                page_size: params.limit,
                page_no: (params.offset/ params.limit) + 1,
            };
            return JSON.stringify(temp);
        },
        toolbar: '#toolbar', //工具按钮用哪个容器
        striped: true, //是否显示行间隔色
        cache: false, //是否使用缓存，默认为true，所以一般情况下需要设置一下这个属性（*）
        pagination: true, //是否显示分页（*）
        sortable: true, //是否启用排序
        sortOrder: "desc", //排序方式
        sidePagination: "client", //分页方式：client客户端分页，server服务端分页（*）
        pageNumber: 1, //初始化加载第一页，默认第一页
        pageSize: 10, //每页的记录行数（*）
        pageList: [10, 25, 50, 100], //可供选择的每页的行数（*）
        search: true, //是否显示表格搜索，此搜索是客户端搜索，不会进服务端，所以，个人感觉意义不大
        strictSearch: true,
        /* showColumns: true, */ //是否显示所有的列
        showRefresh: true, //是否显示刷新按钮
        minimumCountColumns: 2, //最少允许的列数
        clickToSelect: true, //是否启用点击选中行
        height: 500, //行高，如果没有设置height属性，表格自动根据记录条数觉得表格高度
        uniqueId: "journal_id", //每一行的唯一标识，一般为主键列
        showToggle: true, //是否显示详细视图和列表视图的切换按钮
        cardView: false, //是否显示详细视图
        detailView: false,
        editable: true,
        toolbarAlign: "left",
        columns: [
            {
                formatter: function (value, row, index) {
                    return index+1;
                },
                width:30,
                align: 'center',
                title: '序号'
            },
            {
                field: 'journalName2',
                title: '期刊中文名',
                align: 'center',
                sortable: true
            },
            {
                field: 'journalName1',
                title: '期刊英文名',
                align: 'center',
                sortable: true
            },
            {
                field: 'iSSN',
                title: 'ISSN',
                align: 'center',
                sortable: true

            },
            {
                field: 'cn',
                title: '国内刊号',
                align: 'center',
                sortable: true

            },
            {
                field: 'foundYear',
                title: '创办年份',
                align: 'center',
                sortable: true
            },
            {
                field: 'releaseCycles',
                title: '期刊发布类型',
                align: 'center',
                sortable: true
            },
            {
                field: 'journalEmail',
                title: '期刊email',
                align: 'center',
                sortable: true

            },
            {
                field: 'note',
                title: '备注',
                align: 'center',
                sortable: true
            },

            {
                title: '操作',
                field: 'check',
                align: 'center',
                formatter: function(value, row, index) {
                    var e = '<a class = "edit" href="#" mce_href="#"><i class="icon-pencil bigger-130"></i></i></a> ';
                    //var d = '<a class = "remove" href="#" mce_href="#" ><i class="icon-trash bigger-130"></i></a> ';
                    return e;
                },
                events: 'operateEvents'
            }]

    });


    window.operateEvents = {
        'click .remove': function (e, value, row, index) {
            $('#deleteModal').modal();
            $("#deleteModal .confirm").click(function (e) {
                $.ajax({
                    type: "POST",
                    contentType: "application/json",
                    dataType: 'json',
                    url: '/ma/journal/delete-journal',
                    data: JSON.stringify({
                        "journal_id": row.journal_id
                    }),
                    success: function (response) {
                        if (response.data == true) {
                            $('#sample-table-2').bootstrapTable('remove', {
                                field: 'journal_id',
                                values: [row.journal_id]
                            });
                            $('#deleteModal').modal('hide');
                        } else {
                            alert(response.message);
                        }
                    }
                });
            })
        },

        'click .edit': function (e, value, row, index) {
            $("#journalName2_edit").val(row.journalName2);
            $("#journalName1_edit").val(row.journalName1);
            $("#iSSN_edit").val(row.iSSN);
            $("#CN_edit").val(row.cn);
            $("#releaseCycles_edit").val(row.releaseCycles);
            $("#journalEmail_edit").val(row.journalEmail);
            $("#foundYear_edit").val(row.foundYear);
            $("#note_edit").val(row.note);

            $('#edit').modal();

            $('#btn_submit_edit').click(function () {
                $.ajax({
                    type: "POST",
                    url: "/ma/journal/edit-journal",
                    contentType: "application/json;charset=utf-8",
                    dataType: "json",
                    data: JSON.stringify({
                        "indexNo":row.indexNo,
                        "institutionID":row.institutionID,
                        "foundYear":row.foundYear,
                        "journalName2": $('#journalName2_edit').val(),
                        "journalName1": $('#journalName1_edit').val(),
                        "releaseCycles": $('#releaseCycles_edit').val(),
                        "journalEmail": $('#journalEmail_edit').val(),
                        "note": $('#note_edit').val(),
                        "cN": $('#CN_edit').val(),
                        "iSSN": $('#iSSN_edit').val()
                    }),
                    success: function (response) {
                        if (response.code == 0) {
                            if (response.data == true) {
                                window.location.reload();
                                alert("成功");
                            }else {
                                alert("失败");
                            }
                        } else {
                            alert(response.message);
                        }
                    },
                    error: function (message) {
                        alert("修改失败，稍后再试");
                    }
                });
            });

        },
    };
</script>



<script type="text/javascript">
    var isOkClick = false;  //判断按钮是否被点击  关于索引号的
    var isInsertAuthor = false;

    function isOk() {
        isOkClick = true;
        return true;
    }
    function isCancel(){
        $("#myModal").modal('hide');  //手动关闭
        $('#myModal').on("hidden.bs.modal",function(){
            $(document.body).addClass("modal-open");
        });
    }
    function GenerateIndexNo() {
        if (document.getElementById('year').value.length == 0) {
            alert('请先填写年份！');
            return false;
        } else {
            $('#myModal').modal();
            $(document).on('click', '#myModal', function () {
                if (isOkClick) {//确定则显示索引号
                    IndexNo.disabled = false;
                    var y = $('#year').val();
                    var arr = ['A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z'];
                    var idvalue = '';
                    idvalue = arr[Math.floor(Math.random() * 26)];
                    var idvalue1 = 'J';//期刊本身是从字母J开始编号的；
                    var chinaName = $('#surName').val();
                    var pinyinSurName = chineseToPinYin(chinaName);//姓变为拼音
                    var ming = $('#Name').val();//名字
                    var i = 0;
                    while (i < ming.length) {
                        var ming1 = chineseToPinYin(ming.substring(i, i + 1));
                        pinyinSurName = pinyinSurName + ming1.substring(0, 1);
                        i++;
                    }
                    var pinYinIndexNo = pinyinSurName + y + idvalue1;
                    $("#IndexNo").attr("value", pinYinIndexNo);
                    document.getElementById("IndexNoBtn").setAttribute("disabled", true);
                    $("#IndexNo").attr("readonly", "readonly");
                    $("#myModal").modal('hide');  //手动关闭
                    $('#myModal').on("hidden.bs.modal",function(){
                        $(document.body).addClass("modal-open");
                    });
                    return true;
                }
            });
        }
    }
</script>
<script type="text/javascript">
    function getCurrentTime() {
        //alert("得到系统时间之前");
        var now = new Date();
        var year = now.getFullYear(); //得到年份
        var month = now.getMonth();//得到月份
        var date = now.getDate();//得到日期
        var day = now.getDay();//得到周几
        var hour = now.getHours();//得到小时
        var minu = now.getMinutes();//得到分钟
        var sec = now.getSeconds();//得到秒
        month = month + 1;
        if (month < 10) month = "0" + month;
        if (date < 10) date = "0" + date;
        if (hour < 10) hour = "0" + hour;
        if (minu < 10) minu = "0" + minu;
        if (sec < 10) sec = "0" + sec;
        var time = year + "-" + month + "-" + date + " " + hour + ":" + minu + ":" + sec;
        ;
        //alert("当前时间为:"+time);
        return time;
    }

    function addUserIndexNoTable() {
        var UserNo = document.getElementById("sd").value;
        var Item = "无";
        var IndexCode = "JB";//中文期刊是JB，英文期刊是JA
        var Status = 1;
        var Stamp = getCurrentTime();
        if (document.getElementById('IndexNo').value.length == 0) {
            alert('请先生成索引号！');
        } else {
            var IndexNo = $('#IndexNo').val();//索引号是UserIndexNoTable的主键，表示文献全集
            $.ajax({
                url: "/ma/AuthorIndex/addUSerIndex",
                type: "POST",
                data: {
                    "UserNo": UserNo,
                    "IndexNo": IndexNo,
                    "Item": Item,
                    "IndexCode": IndexCode,
                    "Status": Status,
                    "Stamp": Stamp
                },
                dataType: "json",
                cache: false,
                success: function (data) {
                    if (data == true) {
                        return true;
                    } else if (data == false) {
                        return false;
                    }
                },
                error: function () {
                    return false;
                }
            });
        }
    }

    var i = 1;
    function addAuthorTable() {
        var xing = $('#surName').val();
        var ming = $('#Name').val();
        var email="";
        if (document.getElementById('E-mail').value.length == 0){
            e_mail="";
        }
        else{
            e_mail = $('#E-mail').val();
        }
        var id = $('#id').val();
        if (document.getElementById('year').value.length == 0) {
            alert('请先生成索引号！');
            return false;
        } else {
            if(i==1)
            {
                addUserIndexNoTable();
            }
            $.ajax({
                url: "/ma/AuthorIndex/addAuthorIndex",
                type: "POST",
                data: {
                    "id": id,
                    "getCount": i,
                    "surName": $('#surName').val(),
                    "Name": $('#Name').val(),
                    "Email": $('#E-mail').val(),
                    "IndexNo": $('#IndexNo').val()
                },
                dataType: "json",
                cache: false,
                success: function (data) {
                    if(data){
                        alert("成功加入作者索引表!");
                        var AuthorTable = document.getElementById("tbAuthor"); //定位到table上
                        var Row = AuthorTable.insertRow(i);
                        var No = Row.insertCell();
                        var Name = Row.insertCell();
                        var email = Row.insertCell();
                        //前端数据显示
                        No.style.width = '50px';
                        Name.style.width = '80px';
                        email.style.width = '170px';
                        No.innerHTML = i++;
                        Name.innerHTML = xing + ming;
                        email.innerHTML = e_mail;
                        //加到tbody
                        var tbody = document.getElementById('authorTable');
                        tbody.appendChild(Row); //将节点tr加入tbody中
                        $('#surName').val("");
                        $('#Name').val("");
                        $('#E-mail').val("");
                        isInsertAuthor = true;
                        return true;
                    }
                    else{
                        alert("插入作者索引表失败");
                    }
                },
                error: function () {
                    alert("加入作者索引表失败,表中已存在该作者!或者作者为空");
                }
            });
        }
    }
    function Confirm() {
        if (isInsertAuthor == false || isOkClick == false){
            alert("请先生成索引号再录入期刊作者表")
            return false;
        }
        addJournalTable2();
        $("#tbAuthor tr:not(:first)").empty();
        i=1;
        //$('#tbAuthor tbody').html("");
        document.getElementById("IndexNoBtn").removeAttribute("disabled");
        $("#IndexNo").attr("value", "");
        $('#jounalAddForm')[0].reset();
    }
    function Cancel() {
        $("#tbAuthor tr:not(:first)").empty();
        i=1;
        //$('#tbAuthor tbody').html("");
        document.getElementById("IndexNoBtn").removeAttribute("disabled");
        $("#IndexNo").attr("value", "");
        $('#jounalAddForm')[0].reset();
    }

    function Close() {
        $('#showJournal').modal('hide');
        $(".modal-backdrop.fade").hide();
    }
</script>
<script type="text/javascript">
    function testISSN()//检测索引号是针对publishertable2中的ISSN检测是否存在
    {
        if (document.getElementById('ISSN1').value.length < 4 || document.getElementById('ISSN2').value.length < 4) {
            alert("请将ISSN输入完整！");
        } else {
            var ISSN = $('#ISSN1').val() + "-" + $('#ISSN2').val();
            var id = $('#id').val();
            $.ajax({
                url: "/ma/AuthorIndex/checkISSN",
                type: "POST",
                data: {"id": id, "ISSN": ISSN},
                dataType: "text",
                //contentType:"application/json;charset=UTF-8",
                cache: false,
                success: function (data) {
                    if (data) {
                        alert("该ISSN在系统中已存在,无需填写出版商信息!");

                    } else {
                        alert("该ISSN在系统中未存在，请先手动填写出版商信息!");
                        PublisherChineseName.disabled = false;
                        PublisherEnglishName.disabled = false;
                        PublisherNote.disabled = false;
                        PublisherWebSite.disabled = false;
                        PublisherAddress.disabled = false;
                        addPublisherBtn.disabled = false;
                        //addPublisherTable2();
                    }
                },
                error: function () {
                    alert("Failed to CheckISSN!");
                }
            });
        }
    }
</script>
<script type="text/javascript">
    function addJournalTable2() {
        //alert("中文期刊录入");
        var IndexNo = $('#IndexNo').val();
        var ISSN = $('#ISSN1').val() + "-" + $('#ISSN2').val();
        var EnglishName = $('#EnglishName').val();
        var ChineseName = $('#ChineseName').val();
        var FoundYear = $('#year').val();
        var Note = $('#Note').val();
        var CN = $('#CN').val();
        var JournalEmail = $('#JournalEmail').val();
        var id = $('#id').val();
        var ReleaseCycles = $('#ReleaseCycles option:selected').text();//选中的值
        var Publisher = $('#Publisher option:selected').text();//选中的值
        if (IndexNo.length == 0 || ISSN.length == 0 || ChineseName.length == 0 || FoundYear.length == 0)
            alert("请将索引号、ISSN、期刊中文名、发行年份参数填写完整!");
        else {
            $.ajax({
                url: "/ma/AuthorIndex/addJournalTable",
                type: "POST",
                data: {
                    "id": id,
                    "IndexNo": IndexNo,
                    "ChineseName": ChineseName,
                    "EnglishName": EnglishName,
                    "ISSN": ISSN,
                    "InstitutionName2":Publisher,
                    "FoundYear": FoundYear,
                    "ReleaseCycles": ReleaseCycles,
                    "CN": CN,
                    "JournalEmail":JournalEmail,
                    "Note": Note
                },
                dataType: "json",
                //contentType:"application/json;charset=UTF-8",
                cache: false,
                success: function (data) {
                    if (data)
                    {
                        alert("已成功插入中文期刊表中!");
                        document.getElementById("IndexNoBtn").removeAttribute("disabled");
                        $('#tbAuthor tbody').html("");
                        $('#jounalAddForm')[0].reset();
                        $("#IndexNo").attr("value", "");
                        isInsertAuthor == false;
                        isOkClick == false;
                    }
                    else
                        alert("插入表中文期刊表失败!");
                },
                error: function () {
                    alert("Failed to Insert Chinese JournalTable ,try it again!");
                }
            });
        }
    }
</script>
<script type="text/javascript">
    function getAddNewPub()
    {
        var PublisherAddNew = $('#Publisher option:selected').text();
        if (PublisherAddNew == "addNew")
        {
            PublisherChineseName.disabled = false;
            PublisherEnglishName.disabled = false;
            PublisherNote.disabled = false;
            PublisherWebSite.disabled = false;
            PublisherAddress.disabled = false;
            addPublisherBtn.disabled = false;
        }else {
            PublisherChineseName.disabled = true;
            PublisherEnglishName.disabled = true;
            PublisherNote.disabled = true;
            PublisherWebSite.disabled = true;
            PublisherAddress.disabled = true;
            addPublisherBtn.disabled = true;
        }
    }
    $(function () {//页面加载时先调用该函数，使得下拉框有值
        getPublisher()
    })
    function getPublisher(){
        $.ajax({
            url: "/ma/AuthorIndex/getPublisher",
            type: "POST",
            dataType: "text",
            cache: false,
            success: function (data) {
                if (data)
                {
                    var Data = eval(data);//解析后台传来的json数据
                    var i,ii;
                    for (var i = 0; i < Data.length; i++)
                    {
                        ii = i ;
                        Publisher.options[ii] = new Option();
                        Publisher.options[ii].text = Data[i];
                        Publisher.options[ii].value = Data[i];
                    }
                    Publisher.options[ii + 1] = new Option();
                    Publisher.options[ii + 1].text = "addNew";
                    Publisher.options[ii + 1].value = "addNew";
                    Country.options[0].selected=true;
                    Province.options[0].selected=true;
                    City.options[0].selected=true;
                } else
                {
                    alert("Not OK!");
                }
            },
            error: function () {
                alert("failed!");
            }
        });
    }
</script>
<script type="text/javascript">
    function setStateName2() {
        var Region = $('#Country option:selected').text();//区域
        var id = $('#id').val();
        //alert(Region);
        $.ajax({
            url: "/ma/AuthorIndex/getStateName",
            type: "POST",
            data: {"id": id, "Region": Region},
            dataType: "text",
            //contentType:"application/json;charset=UTF-8",
            cache: false,
            success: function (data) {
                if (data) {
                    var arraydata = eval(data);//解析后台传来的json数据
                    Province.options.length = 1;
                    City.options.length = 1;
                    for (var i = 0; i < arraydata.length; i++) {
                        var ii = i + 1;
                        Province.options[ii] = new Option();
                        Province.options[ii].text = arraydata[i];
                        Province.options[ii].value = arraydata[i];
                    }
                } else {
                    alert("Not OK!");
                }
            },
            error: function () {
                alert("failed!");
            }
        });
    }

    function setCityName2() {
        var StateName2 = $('#Province option:selected').text();//省
        var id = $('#id').val();
        //alert(StateName2);
        $.ajax({
            url: "/ma/AuthorIndex/getCityName",
            type: "POST",
            data: {"id": id, "StateName2": StateName2},
            dataType: "text",
            //contentType:"application/json;charset=UTF-8",
            cache: false,
            success: function (data) {
                if (data) {
                    var Data = eval(data);//解析后台传来的json数据
                    City.options.length = 1;
                    var i, ii;
                    for (i = 0; i < Data.length; i++) {
                        ii = i + 1;
                        City.options[ii] = new Option();
                        City.options[ii].text = Data[i];
                        City.options[ii].value = Data[i];
                    }
                    City.options[ii + 1] = new Option();
                    City.options[ii + 1].text = "addNew";
                    City.options[ii + 1].value = "addNew";
                } else {
                    alert("Not OK!");
                }
            },
            error: function () {
                alert("failed!");
            }
        });
    }

    function getCity() {
        var CityAddNew = document.getElementById("City").value;
        if (CityAddNew == "addNew") {
            addCityBtn.disabled = false;
            CityChineseName.disabled = false;
            CityEnglishName.disabled = false;
        }
    }

    function addCityTable() {
        var Region = $('#Country option:selected').text();//区域
        var StateName2 = $('#Province option:selected').text();//	国家
        var CityName2 = $('#CityChineseName').val();//中文
        var CityName1 = $('#CityEnglishName').val();//英文
        var id=$('#id').val();
        $.ajax({
            url: "/ma/AuthorIndex/addCityStateTable",
            type: "POST",
            data: {"id":id,"Region": Region, "StateName2": StateName2, "CityName2": CityName2, "CityName1": CityName1},
            dataType: "json",
            cache: false,
            success: function (data) {
                if (data) {
                    alert("已成功插入城市表中!");
                    addCityBtn.disabled = true;
                    $("#CityChineseName").val("");//清除内容
                    $("#CityEnglishName").val("");//清除内容
                    CityChineseName.disabled = true;
                    CityEnglishName.disabled = true;
                    setCityName2();
                } else
                    alert("插入表城市表失败!");
            },
            error: function () {
                alert("Failed to Insert City Table !");
            }
        });
    }
</script>
<script type="text/javascript">
    function addInstitutionTable2() {//添加出版机构表信息
        //alert("添加机构表信息");
        var PublisherName2 = $('#PublisherChineseName').val();//中文
        var PublisherName1 = $('#PublisherEnglishName').val();//英文
        var Country = $('#Country option:selected').text();//选中的值
        var Province = $('#Province option:selected').text();//选中的值
        var City = $('#City option:selected').text();//选中的值
        var website = $('#PublisherWebSite').val();
        var Note = $('#PublisherNote').val();
        var PublisherAddress = $('#PublisherAddress').val();
        var id = $('#id').val();
        $.ajax({
            url: "/ma/AuthorIndex/addInstitutionTable",
            type: "POST",
            data: {
                "id": id,
                //"PublisherID": PublisherID,
                "InstitutionName2": PublisherName2,
                "InstitutionName1": PublisherName1,
                "Country": Country,
                "Province": Province,
                "City": City,
                "InstitutionWebsite": website,
                "InstitutionAddress": PublisherAddress,
                "Note": Note
            },
            dataType: "json",
            cache: false,
            success: function (data) {
                if (data)
                {
                    alert("已成功插入出版机构表中,请继续录入期刊其它信息!");
                    getPublisher();
                    $('#PublisherChineseName').val("");
                    $('#PublisherEnglishName').val("");
                    $('#PublisherNote').val("");
                    $('#PublisherWebSite').val("");
                    $('#PublisherAddress').val("");
                    PublisherChineseName.disabled = true;
                    PublisherEnglishName.disabled = true;
                    PublisherNote.disabled = true;
                    PublisherWebSite.disabled = true;
                    PublisherAddress.disabled = true;
                    addPublisherBtn.disabled = true;

                }
                else
                    alert("插入表出版机构表失败!");
            },
            error: function () {
                alert("Failed to Insert institutiontable,try it again!");
            }
        });
    }
</script>


<script type="text/javascript">
    function add() {
        $('#showJournal').modal();
    }
</script>
<div>
    <input type="text" id="sd" value="" style="border: none;display:none">
</div>
<script type="text/javascript">
    var url = decodeURI(window.location.href);
    var aa = url.indexOf('=');
    if (aa > -1) {
        url = url.substring(aa + 1);
        document.getElementById("sd").value = url;
        //alert("得到的userNo是:"+document.getElementById("sd").value);
    }
</script>

<div class="modal fade" id="showJournal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <!-- style="margin-top:10px" -->
    <div class="modal-dialog modal-lg" role="document">
        <div class="modal-content" style="width: 1010px">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close" aria-hidden="true">×
                </button>
                <div style="text-align:center">
                    <h1 class="modal-title"><b>中文期刊录入</b></h1>
                </div>
            </div>
            <div class="modal-body">
                <div class="wrap">
                    <form action="journalAdd.html" id="jounalAddForm" class="form-horizontal" role="form">
                        <div style="margin-left:20px;color:red; width: 200px; height: 30px"><b>依次输入作者姓名（汉字）</b></div>
                        <div class="form-group"
                             style="margin-left:20px; overflow-x:auto; overflow-y: auto;  width:300px; height: 100px ;float:right">
                            <table border="1" id="tbAuthor" style="width: 60px; height: 60px">
                                <thead style="width: 300px; height: 25px">
                                <tr>
                                    <th style="width: 50px; height: 25px ;text-align:center">序号</th>
                                    <th style="width: 80px; height: 25px ;text-align:center">作者姓名</th>
                                    <th style="width: 170px; height: 25px ;text-align:center">作者Email</th>
                                </tr>
                                <tbody id="authorTable" style="width: 300px; height: 200px">
                                <tr>
                                    <td></td>
                                    <td></td>
                                    <td></td>
                                </tr>
                                </tbody>
                            </table>
                        </div><!-- class="col-sm-3 control-label no-padding-right" for="form-field-1" -->
                        <div class="form-group" style="margin-left:5px;width: 800px; font-size:100px; height: 30px">
                            <label class="col-xs-10 col-sm-5" for="surName"
                                   style="width: 90px;float:left"> 主编姓：</label>
                            <input required="required" type="text" id="surName" name="surName" placeholder=""
                                   class="col-xs-9 col-sm-4" style="width: 112px; height: 24px">
                            &nbsp;
                            <label class="col-xs-10 col-sm-5" for="Name"
                                   style="width: 90px;float:left"> 主编名：</label>
                            <input required="required" type="text" id="Name" placeholder="" name="Name"
                                   class="col-xs-9 col-sm-4" style="width: 123px; height: 24px">
                        </div>
                        <div class="form-group" style="margin-left:5px;width: 800px; height: 30px">
                            <label class="col-xs-10 col-sm-5" for="E-mail"
                                   style="width: 90px; height: 30px">E-mail：</label>
                            <input required="required" type="text" id="E-mail" name="Email" placeholder=""
                                   class="col-xs-10 col-sm-4" style="width: 319px; height: 24px">
                            &nbsp;&nbsp;&nbsp
                            <button id="ddUserIndexNoBtn" style="width: 100px; height: 25px;display:none"
                                    onClick="addUserIndexNoTable()">录入作者索引表
                            </button>
                            <input required="required" type="text" id="id" name="id" placeholder="" value="2"
                                   class="col-xs-10 col-sm-4" style="width: 319px; height: 24px;display:none">
                        </div>

                        <div class="form-group" style="margin-left:5px;width: 800px;  height: 30px">
                            <label class="col-xs-10 col-sm-5" for="year"
                                   style="width: 90px; height: 33px">年&nbsp;&nbsp;&nbsp;份：</label>
                            <input required="required" type="text" id="year" name="year" placeholder=""
                                   class="col-xs-10 col-sm-5" style="width: 151px; height: 25px">
                            &nbsp;&nbsp;<button id="IndexNoBtn" style="width: 100px; height: 25px"
                                                onClick="GenerateIndexNo()">生成索引号
                        </button>
                        </div>
                        <div class="form-group" style="margin-left:5px;width: 800px; height: 30px">
                            <label class="col-xs-4 col-sm-5"
                                   style="width: 300px; height: 33px">请在生成索引号之后点击录入期刊作者表：</label>
                            <button id="addAuthorBtn" name="subAuthor" style="width: 100px; height: 25px"
                                    onClick="addAuthorTable()">录入期刊作者表
                            </button>
                        </div>
                        <div class="form-group" style="margin-left:5px;width: 900px; height: 40px">
                            <label class="col-xs-10 col-sm-5" for="IndexNo"
                                   style="width: 90px; height: 30px"> 索引号：</label>
                            <input required="required" type="text" id="IndexNo" name="IndexNo"
                                   class="col-xs-10 col-sm-5" disabled="disabled" style="width: 120px; height: 25px">
                            <label class="col-sm-3 control-label no-padding-right" style="width: 180px;height: 25px;color:red ">
                                <b>* 索引号是期刊的唯一标识</b></label>
                            <!--   -->
                            &nbsp;
                            <label class="col-xs-10 col-sm-5" for="Publisher"
                                   style="width: 140px; height: 30px">请选择出版机构&nbsp;:</label>
                            <select name="Publisher" id="Publisher" style="width: 240px; height: 25px "
                                    onchange="getAddNewPub()">
                                <!--                                    <option value="0">请选择出版商</option>-->
                                <!--                                    <option value="1">addNew</option>             -->
                            </select>
                            &nbsp;
                            <!--
                              <button style="width: 50px; height: 24px" id="testBtn" onClick="testISSN()">检测</button>
                             -->

                        </div>
                        <div class="form-group" style="margin-left:5px;width: 800px font-size:100px; height: 40px">
                            <label class="col-xs-10 col-sm-5" for="form-field-1"
                                   style="width: 120px; height: 30px">期刊中文名：</label>
                            <input required="required" class="col-xs-10 col-sm-5" type="text" id="ChineseName"
                                   name="ChineseName" placeholder="" style="width: 200px; height: 24px">
                            <label class="col-xs-10 col-sm-5" for="form-field-1"
                                   style="width: 90px;height: 30px ">发布周期:</label>
                            <select name="ReleaseCycles" id="ReleaseCycles" style="height: 25px; ">
                                <option value="1">不定期</option>
                                <option value="2">季刊</option>
                                <option value="3">月刊</option>
                                <option value="4">双月刊</option>
                                <option value="5">半月刊</option>
                            </select>
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <label style="width:50px">ISSN：</label>
                            <input required="required" maxlength="4"
                                   style="width: 77px; height: 23px" type="text"
                                   id="ISSN1">
                            &nbsp;&nbsp;&nbsp;
                            <input required="required" maxlength="4" style="width: 77px; height: 23px"
                                   type="text" id="ISSN2">&nbsp;&nbsp;&nbsp;
                            <label style="width: 35px">CN:</label>
                            <input required="required" type="text" id="CN" placeholder=""
                                   style="width: 80px; height: 24px">&nbsp;
                        </div>
                        <div class="form-group" style="margin-left:5px;width: 800px font-size:100px; height: 39px">
                            <label class="col-xs-10 col-sm-5" for="form-field-1"
                                   style="width: 120px; height: 30px">期刊英文名:</label>
                            <input required="required" type="text" value="" id="EnglishName" name="EnglishName"
                                   placeholder="" class="col-xs-9 col-sm-4" style="width: 250px; height: 27px">&nbsp;
                            &nbsp;
                            <label class="col-xs-10 col-sm-5" for="form-field-1"
                                   style="width: 120px; ">期刊 E-mail:</label>
                            <input required="required" class="col-xs-10 col-sm-5" type="text" id="journalEmail" placeholder=""
                                   style="width: 180px; height: 24px">
                            <label class="col-sm-3 control-label no-padding-right" for="form-field-5"
                                   style="width: 80px; ">备注 ：</label>
                            <input required="required" class="col-xs-10 col-sm-5" type="text" id="Note" placeholder=""
                                   style="width: 180px; height: 24px">&nbsp;

                            &nbsp;&nbsp;<button id="addJournalBtn" style="width: 100px; height: 25px; display:none"
                                                onClick="addJournalTable2()">录入期刊信息表
                        </button>
                        </div>
                        <div style="margin-left:10px;color:black; width: 220px; height: 31px"><b>填写出版机构相关信息：</b></div>
                        <div>
                            <div class="form-group" style="margin-left:5px; float:left;width: 800px font-size:100px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 150px; height: 40px">出版机构所在地区:</label>
                                <select name="Country" id="Country"
                                        style="width: 95px; height: 30px ;float:left "
                                        onChange="setStateName2()">
                                    <option value="0">选择地区</option>
                                    <option value="中国">中国</option>
                                    <option value="美国">美国</option>
                                    <option value="亚洲">亚洲</option>
                                    <option value="欧洲">欧洲</option>
                                    <option value="其他">其他</option>
                                </select>
                            </div>
                            <div class="form-group" style="margin-left:5px;float:left;;width: 800px font-size:100px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 140px; height: 40px">&nbsp;&nbsp;所在州（省）名: </label>
                                <select name="Province" id="Province"
                                        style="width: 135px; height: 30px;float:left "
                                        onChange="setCityName2()">
                                    <option value="0">选择州或省</option>
                                    <option value=""></option>
                                </select>
                            </div>
                            <div class="form-group" style="margin-left:5px;float:left;;width: 800px font-size:100px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 120px; height: 40px">&nbsp;&nbsp;所在城市名: </label>
                                <select name="City" id="City"
                                        style="width: 100px; height: 30px;float:left "
                                        onChange="getCity()">
                                    <option value="0">选择城市</option>
                                    <option value=""></option>
                                </select>
                            </div>
                            <div class="form-group"
                                 style="margin-left:5px;clear:left;width: 270px font-size:100px height: 30px; ">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 150px; height: 30px">出版机构中文名   :</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text"
                                       id="PublisherChineseName" disabled="disabled" style="width: 200px; height: 27px">
                                &nbsp;<label class="col-xs-10 col-sm-5" for="form-field-1"
                                             style="width: 140px; ">出版机构英文名 :</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text"
                                       id="PublisherEnglishName" disabled="disabled" style="width: 200px; height: 25px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 70px; ">备注 :</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text" id="PublisherNote"
                                       disabled="disabled" placeholder="" style="width: 100px; height: 25px">
                            </div>
                            <div class="form-group"
                                 style="margin-left:5px;clear:left;width: 270px font-size:100px height: 30px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 125px; height: 30px">出版机构网址 :</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text" id="PublisherWebSite"
                                       disabled="disabled" placeholder="" style="width: 222px; height: 27px">
                                <label class="col-xs-10 col-sm-5" for="form-field-1"
                                       style="width: 125px; height: 30px">出版机构地址 :</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text" id="PublisherAddress"
                                       disabled="disabled" placeholder="" style="width: 222px; height: 27px">
                                &nbsp;&nbsp;&nbsp;&nbsp;<button style="width:110px; height: 27px; text-align:center"
                                                                type="button" disabled="disabled" id="addPublisherBtn"
                                                                onClick="addInstitutionTable2()">添加出版机构信息
                            </button>
                            </div>
                            <div style="margin-left:20px;color:black; width: 200px; height: 30px"><b>添加新城市信息：</b>
                            </div>
                            <div class="form-group" style="margin-left:5px;width:800px font-size:100px  height: 35px">
                                <label class="col-sm-3 control-label no-padding-right"
                                       style="width:105px; ">城市中文名：</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text" id="CityChineseName"
                                       disabled="disabled" placeholder="" style="width: 230px; height: 30px">
                                &nbsp;&nbsp;<label class="col-sm-3 control-label no-padding-right"
                                                   style="width: 105px; ">城市英文名：</label>
                                <input required="required" class="col-xs-10 col-sm-5" type="text" id="CityEnglishName"
                                       disabled="disabled" placeholder="" style="width: 251px; height: 31px">
                                <button style="width:100px; height: 27px; text-align:center" type="button"
                                        id="addCityBtn" disabled="disabled" onClick="addCityTable()">加入城市表
                                </button>
                            </div>
                        </div>
                    </form>
                </div>
            </div>    <!-- /.modal-body-->
            <div class="modal-footer" style="width: 990px;margin:auto">
                <div class="wrap" style="width: 256px; text-align: center">
                    <button style="margin-right:600px;width: 50px; height: 30px; text-align: center" id="confirmBtn"
                            onClick="Confirm()"><p align="center">确定</p></button>
                    &nbsp;&nbsp;&nbsp;&nbsp;<button style="margin-right: 100px ;width: 50px; height: 30px;"
                                                    id="cancelBtn"><p align="center" onClick="Cancel()">取消</p></button>
                    &nbsp;&nbsp;&nbsp;&nbsp;<button style="margin-right: 50px; height: 30px; text-align: center"
                                                    id="backBtn"><p align="center" onClick="Close()">关闭</p></button>
                </div>
            </div>    <!--  /.modal-footer-->
            <br>
        </div>    <!-- /.modal-content -->
    </div>    <!-- /.modal-dialog -->
</div>    <!-- /.modal -->
<!--索引号提示 模态框（Modal） -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true"
     style="margin-top:50px;">
    <div class="modal-dialog ">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                <h4 class="modal-title" id="myModalLabel">提示信息！</h4>
            </div>
            <div class="modal-body">
                <div>
                    <p style="font-size:20px">&nbsp;&nbsp;索引号是参考文献的唯一标识，是由第一作者和文献年份共同决定的，一旦生成索引号，将不得进行修改，如果发现索引号有误，必须重新生成参考文献，确定生成？</p>
                </div>
                <div class="modal-footer"><!-- data-dismiss="modal" -->
                    <button type="button" class="btn btn-default" onClick="isCancel()">取消</button>
                    <button type="button" class="btn btn-primary"  onClick="isOk()">确定</button>
                </div><!-- /.modal-body-->
            </div>    <!-- /.modal-footer-->
        </div>    <!-- /.modal-content  -->
    </div>    <!-- /.modal-dialog -->
</div>    <!-- /.modal -->

</body>
</html>